<div class="breadcrumb">
   <a href="">Home</a>
</div>
<div class="box">
    <div class="heading">
      <h1><img alt="" src="/images/admin/home.png" style="width:22px;height:22px;"> Dashboard</h1>
    </div>
    <div class="content">
      	<div class="overview" style="width:100% !important;">
        	<div class="dashboard-heading">Overview</div>
	        <div class="dashboard-content">
	          	<table class="list">
	          		<thead>
		              <tr style="height:30px !important; ">
		                <td style="width:16% !important;font-size:13px !important; padding:0px !important; text-align:center !important;">Total Sales:</td>
		                <td style="width:16% !important;font-size:13px !important; padding:0px !important; text-align:center !important;">Total Sales This Year:</td>
		                <td style="width:16% !important;font-size:13px !important; padding:0px !important; text-align:center !important;">Total Orders:</td>
		                <td style="width:16% !important;font-size:13px !important; padding:0px !important; text-align:center !important;">No. of Customers:</td>
		                <td style="width:16% !important;font-size:13px !important; padding:0px !important; text-align:center !important;">No. of Products:</td>
		                <td style="width:16% !important;font-size:13px !important; padding:0px !important; text-align:center !important;">No. of Comment:</td>
		              </tr>
		            </thead>
		            <tbody>
		              <tr style="height:50px !important; ">
		                <td style="width:16% !important; padding:0px !important; text-align:center !important;"><?php if(isset($this->totalsales) && $this->totalsales!=0){ echo number_format($this->totalsales); echo "VNĐ";} else echo "0 VNĐ"; ?></td>
		                <td style="width:16% !important; padding:0px !important; text-align:center !important;"><?php if(isset($this->totalsalesyear) && $this->totalsalesyear!=0){echo number_format($this->totalsalesyear); echo "VNĐ";} else echo "0 VNĐ"; ?></td>
		                <td style="width:16% !important; padding:0px !important; text-align:center !important;"><?php if(isset($this->countorder) && $this->countorder!=0) echo $this->countorder; else echo "no information!"; ?></td>
		                <td style="width:16% !important; padding:0px !important; text-align:center !important;"><?php if(isset($this->countcustomer) && $this->countcustomer!=0) echo $this->countcustomer; else echo "no information!"; ?></td>
		                <td style="width:16% !important; padding:0px !important; text-align:center !important;"><?php if(isset($this->countproduct) && $this->countproduct!=0) echo $this->countproduct; else echo "no information!"; ?></td>
		                <td style="width:16% !important; padding:0px !important; text-align:center !important;"><?php if(isset($this->countcomment) && $this->countcomment!=0) echo $this->countcomment; else echo "no information!"; ?></td>
		              </tr>
		            </tbody>
		            
	          </table>
	        </div>
      	</div>
      	<div class="latest">
	        <div class="dashboard-heading">Latest 10 Orders</div>
	        <div class="dashboard-content">
		          <table class="list">
		            <thead>
		              <tr>
		                <td class="right">Order ID</td>
		                <td class="left">Customer</td>
		                <td class="left">Status</td>
		                <td class="left">Date Added</td>
		                <td class="right">Total</td>
		                <td class="right">Action</td>
		              </tr>
		            </thead>
		            <tbody>
		              <tr>                          
		              </tr>
		              <?php if(count($this->orderlist)>0) foreach ($this->orderlist as $order) 
		              { ?>
		              <tr>
		                
		                <td class="right"><?php echo $order['bill_id']; ?></td>
		                <td class="left"><?php echo $order['full_name']; ?></td>
		                <td class="left"><?php echo $order['status']; ?></td>
		                <td class="left"><?php echo $order['created_date']; ?></td>
		                <td class="right"><?php echo number_format($order['total_bill_price']); ?> VNĐ</td>
		                <td class="right">[ <a href="/admin/billdetail?id=<?php echo $order['bill_id'];?>">View</a> ]
		                </td>
		                
		              </tr>
		              <?php }?>
		            </tbody>
		          </table>
	        </div>
      	</div>
    </div>
</div>